#include "../lib/define.h"

#define DEV_KBCONTROLLER_COMMAND_MOUSE_SCALING_1_1 0xE6
#define DEV_KBCONTROLLER_COMMAND_MOUSE_SCALING_2_1 0xE7
#define DEV_KBCONTROLLER_COMMAND_NOP 0xEF
#define DEV_KBCONTROLLER_COMMAND_ENABLE_KEYBOARD 0xF4
#define DEV_KBCONTROLLER_COMMAND_ENABLE_MOUSE 0xF4
#define DEV_KBCONTROLLER_COMMAND_DISABLE_KEYBOARD 0xF5
#define DEV_KBCONTROLLER_COMMAND_DISABLE_MOUSE 0xF5
#define DEV_KBCONTROLLER_COMMAND_SET_DEFAULT_PARAMTERS 0xF6
#define DEV_KBCONTROLLER_COMMAND_SET_ALL_KEYS_TYPEMATIC_SCANCODE_SET_3 0xF7
#define DEV_KBCONTROLLER_COMMAND_SET_ALL_KEYS_MAKE_RELEASE 0xF8
#define DEV_KBCONTROLLER_COMMAND_SET_ALL_KEYS_MAKE_ONLY 0xF9
#define DEV_KBCONTROLLER_COMMAND_SET_ALL_KEYS_TYPEMATIC_MAKE_RELEASE 0xFA
#define DEV_KBCONTROLLER_COMMAND_SET_ALL_KEYS_TYPEMATIC 0xFB
#define DEV_KBCONTROLLER_COMMAND_RESEND_LAST_SCANCODE 0xFE
#define DEV_KBCONTROLLER_COMMAND_RESET_MOUSE 0xFF

#define DevKBControllerReadInput(lpbVal) __asm__("in $0x60,%%al":"=a"(*lpbVal))
#define DevKBControllerReadStatus(lpbStatus) __asm__("in $0x64,%%al":"=a"(*lpbStatus))
#define DevKBControllerSendCommandSingle(bCmd) __asm__("out %%al,$0x60"::"a"(bCmd))
